(set 'argslen (length $main-args) )
(set 'usga	(list
				'("		  webpath-burte v0.1")
				'("			by winger\n")
				(list "usage: \n newlisp " (or (main-args 1) "brute.lsp") " -s http://127.0.0.1/ -d path.txt\n")
				'(" -d " 	" --dict " 		"web path file")
				'(" -s " 	" --site " 		"web site name")
				'(" [-t] " 	" --timeout "	"default 100 milsec")
				;(" [-e]" " --errmode "	"display error code")
			)
)
(when (< argslen 6)
		(and (dolist (x usga) (println (join x))) (exit 0))
)
(set 'site	(main-args 3))
(if (ends-with site "/") nil (extend site "/"))
(set 'dictfile (main-args 5))
(set 'timeout (or (main-args 7) 100))
(set 'errreg {^ERR.*(\d{3}).*\r\n})
(set 'allpath (parse (read-file "path.txt") {\r\n|\n|\r} 0))
(println "====Just For Free====")
[cmd] (set 'spendtime (time
(dolist (x allpath)
	(if (nil? (find errreg (get-url (set 'tmpurl (append site x)) timeout) 0))
		(println "Found: " tmpurl )
		(println "Error: " $1 " "tmpurl)
	)
))) [/cmd]
(println "Finish scan spend " (div spendtime 1000) "sec.")
(exit (read-key))